//
//  defines.h
//  IOTCamViewer
//
//  Created by huangzhixiong on 14-12-10.
//  Copyright (c) 2014年 TUTK. All rights reserved.
//

#ifndef IOTCamViewer_defines_h
#define IOTCamViewer_defines_h

//#define DEBUG   1
//发布的时候必须去掉蒲公英或其他第三方升级提示

#if defined(P2PNEX)
#define MAX_CAMERA_LIMIT        20
#elif defined(P2PAIC) || defined(P2PAUROCAM)
#define MAX_CAMERA_LIMIT        20
#else
#define MAX_CAMERA_LIMIT        8
#endif

#define COMMON_ANIMATION_TIME   0.3
#define COMMON_ANIMATION2_TIME  0.4



/*
 * tutk_lib (orig or new)
 */

//#if defined(AIC32LIB)

#if defined(AIC32LIB) || defined(P2PMENBOSHI)

#define LIB_140210
#import <IOTCamera/GLog.h>
#import <IOTCamera/GLogZone.h>
#import "IOTCamera/GaVideoFrameDataGenerator.h"

#endif

/*
 P2PCam264 使用的系统头文件
 */
//#import "iToast.h"
#import "MyCamera.h"
#import <IOTCamera/Camera.h>
#import <IOTCamera/AVIOCTRLDEFs.h>
#import "AVIOCTRLDEFuserdefineds.h"
#import "CameraShowGLView.h"


/*
 * share
 */

#if defined(STYLE_BLUE_AIC) || defined(STYLE_ORANGE_AIC)
#if defined(P2P7NK) || defined(P2PBOKEDIANGONG) || defined(P2PSHICLOUD) || defined(P2PWEIERXIN) || defined(P2PSRTK) || defined(P2PXBROBOT)
#else
#define Share_ShareSDK
//#define Share_UMengShare
#endif
#endif

#if defined(P2PPETWANT) //|| defined(P2PBANDIANGOU)
#ifndef Share_ShareSDK
#define Share_ShareSDK
#endif
#endif


/*
 * third auth login
 */

#if defined(P2PPETWANT) //|| defined(P2PBANDIANGOU)
#ifndef THIRD_AUTH_LOGIN
#define THIRD_AUTH_LOGIN
#endif
#endif


/*
 * update check
 */

#if defined(P2PMENBOSHI)
#define APP_APPLE_ID                  @"1018573677"

#else
#define APP_APPLE_ID                @""  //

#endif

#define APP_CHECK_UPDATE_URL        @"https://itunes.apple.com/lookup?id="APP_APPLE_ID
#define APP_UPDATE_DOWNLOAD_URL     @"https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id="APP_APPLE_ID


/*
 * pgyer-sdk
 */



/*
 * MyCamera -> audio_to_support
 */
#ifndef AUDIO_TO_SUPPORT
#define AUDIO_TO_SUPPORT
#endif


/*
 * SMS_SDK
 */
#if defined(P2PBANDIANGOU)

#ifndef SHARESDK_SMSSDK
#define SHARESDK_SMSSDK
#endif

#endif


/*
 * download remote record
 */
#if defined(P2PNEX)

#ifndef DOWNLOAD_REMOTE_RECORD
#define DOWNLOAD_REMOTE_RECORD
#endif

#endif



/*
 * xinge push Nomal_Server APP_ID
 */

#if defined(P2PMENBOSHI2)
#define XG_APPN_STR         @"mbs2"

#else
#define XG_APPN_STR         @""
#endif


/*
 * advertisement
 */

#if defined(P2PNEX)
#define AD_VIEW_ENABLE
#endif


/*
 * UI background
 */

#if defined(P2PBANDIANGOU)

#else
#define UI_BACKGROUND_IMG_NAME  @"pw_aid_bg.jpg"
#define UI_NAV_IMG_NAME         @""
#define UI_TAB_IMG_NAME         @""
#endif


/*
 * URL store or other
 */
#if defined(P2PNEX)
#else
#define STORE_URL               @""
#endif

#if defined(P2PMENBOSHI2)
#define XG_APPN_STR         @"mbs2"

#else
#define XG_APPN_STR         @"szy"
#endif


/*
 * XG_PUSH
 */

#if defined(XG_PUSH)
#define XG_PUSH_ID              @"2200112251"
#define XG_PUSH_KEY             @"IW5JSKK4239N"
#if defined(P2PMENBOSHI)

#if defined(DOOR_TEST)
#define XG_PUSH_ID              @"2200121910"
#define XG_PUSH_KEY             @"I3A2PQ45C8NI"
#elif defined(P2PMENBOSHI2)
#define XG_PUSH_ID              @"2200198800"
#define XG_PUSH_KEY             @"INZ1G4PK925J"

#else

#endif


#else
ID and KEY
//[XGPush startApp:2200108976 appKey:@"ILS4JLI4652L"];


////[XGPush startApp:2200108784 appKey:@"I9TR7FW824HD"];
//[XGPush startApp:2290000353 appKey:@"key1"];
#endif

#endif



#pragma mark - --------------------------摄像头部分--------------------------
#import "FMDatabase.h"
#import "FMDatabaseAdditions.h"
#import "FMDatabasePool.h"
#import "FMDatabaseQueue.h"
#import "MyCamera.h"
#import <IOTCamera/AVIOCTRLDEFs.h>

#define SQLCMD_CREATE_TABLE_DEVICE @"CREATE TABLE IF NOT EXISTS device(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, dev_nickname TEXT, dev_name TEXT, dev_pwd TEXT, view_acc TEXT, view_pwd TEXT, ask_format_sdcard INTEGER, channel INTEGER,indexView text)"

#if defined(ACCOUNT_MODE)
#define SQLCMD_CREATE_TABLE_DEVICE2 @"CREATE TABLE IF NOT EXISTS device2(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, dev_nickname TEXT, dev_name TEXT, dev_pwd TEXT, view_acc TEXT, view_pwd TEXT, ask_format_sdcard INTEGER, channel INTEGER, dev_type TEXT, is_add_server_success INTEGER)"
#endif


#if defined(LOCAL_SOURCE2)
#define SQLCMD_CREATE_TABLE_SNAPSHOT2 @"CREATE TABLE IF NOT EXISTS snapshot2(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, file_path TEXT, time REAL, file_size REAL)"
#define SQLCMD_CREATE_TABLE_RECORD2 @"CREATE TABLE IF NOT EXISTS record2(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, file_path TEXT, time REAL, file_size REAL)"
#else
#define SQLCMD_CREATE_TABLE_SNAPSHOT @"CREATE TABLE IF NOT EXISTS snapshot(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, file_path TEXT, time REAL)"
#define SQLCMD_CREATE_TABLE_RECORD @"CREATE TABLE IF NOT EXISTS record(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, file_path TEXT, time REAL)"
#endif


#define SQLCMD_CREATE_TABLE_EVENT @"CREATE TABLE IF NOT EXISTS event(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, event_type REAL, event_time REAL)"

#define SQLCMD_CREATE_TABLE_NOTIFICATION @"CREATE TABLE IF NOT EXISTS notification(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, push_notification INTEGER)"

#define SQLCMD_CREATE_TABLE_REMOTE_RECORD @"CREATE TABLE IF NOT EXISTS remote_record(id INTEGER PRIMARY KEY AUTOINCREMENT, dev_uid TEXT, file_path TEXT, time REAL, file_size REAL)"












#endif //define IOTCamViewer_defines_h
